//
//  ViewController.m
//  分页
//
//  Created by Burn on 2019/4/22.
//  Copyright © 2019 menksoft. All rights reserved.
//

#import "ViewController.h"
#import "MenkSegment.h"
#import "MenkSoftSegment.h"

@interface ViewController ()<MenkSoftSegmentDelegate>

@property(strong,nonatomic) MenkSoftSegment *segment;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.segment = [[MenkSoftSegment alloc]initWithFrame:CGRectMake(50, 100, 300, 50) andTItles:@[@"AAAAA",@"BBBBBB",@"CCCCC",@"DDDDDDD"]];
    self.segment.delegate = self;
    self.segment.originalIndex = 2;
    [self.view addSubview:self.segment];
    
    UISegmentedControl *segmentC = [[UISegmentedControl alloc]initWithItems:@[@"AAAAA",@"BBBBBB",@"CCCCC",@"DDDDDDD"]];
    segmentC.frame = CGRectMake(50, 170, 300, 50);
    [self.view addSubview:segmentC];
}

- (void)didchangeForIndex:(NSInteger)index{
    NSLog(@"%ld",index);
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{

}

@end
